home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / ci.1 < prev    next >
Text File  |  1995-07-25  |  23KB  |  529 lines

  1.  
  2.  
  3.  
  4. CI(1)                                                       CI(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ci - check in RCS revisions
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ccii [_o_p_t_i_o_n_s] _f_i_l_e ...
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        ccii  stores  new  revisions  into RCS files.  Each pathname
  15.        matching an RCS suffix is taken to be an  RCS  file.   All
  16.        others  are  assumed  to  be  working files containing new
  17.        revisions.  ccii deposits the contents of each working  file
  18.        into  the  corresponding RCS file.  If only a working file
  19.        is given, ccii tries to find the corresponding RCS  file  in
  20.        an  RCS subdirectory and then in the working file's direc-
  21.        tory.  For more details, see FILE NAMING below.
  22.  
  23.        For ccii to work, the caller's login must be on  the  access
  24.        list,  except if the access list is empty or the caller is
  25.        the superuser or the owner of the file.  To append  a  new
  26.        revision  to  an existing branch, the tip revision on that
  27.        branch must be locked by the caller.   Otherwise,  only  a
  28.        new  branch  can  be  created.   This  restriction  is not
  29.        enforced for the owner of the file if  non-strict  locking
  30.        is  used (see rrccss(1)).  A lock held by someone else may be
  31.        broken with the rrccss command.
  32.  
  33.        Unless the --ff option is given, ccii checks whether the revi-
  34.        sion  to  be deposited differs from the preceding one.  If
  35.        not, instead of creating a new revision ccii reverts to  the
  36.        preceding one.  To revert, ordinary ccii removes the working
  37.        file and any lock; ccii --ll keeps and ccii --uu removes any lock,
  38.        and  then they both generate a new working file much as if
  39.        ccoo --ll or ccoo --uu had been applied to the preceding revision.
  40.        When reverting, any --nn and --ss options apply to the preced-
  41.        ing revision.
  42.  
  43.        For each revision deposited, ccii prompts for a log message.
  44.        The  log  message  should summarize the change and must be
  45.        terminated by end-of-file or by  a  line  containing  .. by
  46.        itself.   If  several files are checked in ccii asks whether
  47.        to reuse the previous log message.  If the standard  input
  48.        is  not  a terminal, ccii suppresses the prompt and uses the
  49.        same log message for all files.  See also --mm.
  50.  
  51.        If the RCS file does not exist, ccii creates it and deposits
  52.        the  contents  of the working file as the initial revision
  53.        (default number: 11..11).  The access list is initialized  to
  54.        empty.   Instead  of the log message, ccii requests descrip-
  55.        tive text (see --tt below).
  56.  
  57.        The number _r_e_v of the deposited revision can be  given  by
  58.        any of the options --ff, --II, --kk, --ll, --MM, --qq, --rr, or --uu.  _r_e_v
  59.        may be symbolic, numeric, or  mixed.   If  _r_e_v  is  $$,  ccii
  60.        determines  the revision number from keyword values in the
  61.  
  62.  
  63.  
  64. GNU                         1991/10/07                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CI(1)                                                       CI(1)
  71.  
  72.  
  73.        working file.
  74.  
  75.        If _r_e_v is a revision number, it must be  higher  than  the
  76.        latest  one  on  the  branch to which _r_e_v belongs, or must
  77.        start a new branch.
  78.  
  79.        If _r_e_v is a branch rather than a revision number, the  new
  80.        revision  is appended to that branch.  The level number is
  81.        obtained by incrementing the tip revision number  of  that
  82.        branch.   If  _r_e_v  indicates  a  non-existing branch, that
  83.        branch is  created  with  the  initial  revision  numbered
  84.        _r_e_v..11.
  85.  
  86.        If  _r_e_v  is  omitted,  ccii tries to derive the new revision
  87.        number from the caller's last lock.   If  the  caller  has
  88.        locked  the  tip revision of a branch, the new revision is
  89.        appended to that  branch.   The  new  revision  number  is
  90.        obtained  by incrementing the tip revision number.  If the
  91.        caller locked a non-tip revision, a new branch is  started
  92.        at that revision by incrementing the highest branch number
  93.        at that revision.  The default initial  branch  and  level
  94.        numbers are 11.
  95.  
  96.        If _r_e_v is omitted and the caller has no lock, but owns the
  97.        file and locking is not set to _s_t_r_i_c_t, then  the  revision
  98.        is appended to the default branch (normally the trunk; see
  99.        the --bb option of rrccss(1)).
  100.  
  101.        Exception: On the trunk, revisions can be appended to  the
  102.        end, but not inserted.
  103.  
  104. OOPPTTIIOONNSS
  105.        --rr[_r_e_v]
  106.               checks  in  a  revision, releases the corresponding
  107.               lock, and removes the working file.   This  is  the
  108.               default.
  109.  
  110.               The  --rr  option  has  an unusual meaning in ccii.  In
  111.               other RCS commands, --rr merely specifies a  revision
  112.               number,  but  in  ccii  it  also  releases a lock and
  113.               removes the working file.   See  --uu  for  a  tricky
  114.               example.
  115.  
  116.        --ll[_r_e_v]
  117.               works  like  --rr,  except  it performs an additional
  118.               ccoo --ll  for  the  deposited  revision.   Thus,   the
  119.               deposited revision is immediately checked out again
  120.               and locked.  This is useful for saving  a  revision
  121.               although one wants to continue editing it after the
  122.               checkin.
  123.  
  124.        --uu[_r_e_v]
  125.               works like --ll, except that the  deposited  revision
  126.               is not locked.  This lets one read the working file
  127.  
  128.  
  129.  
  130. GNU                         1991/10/07                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CI(1)                                                       CI(1)
  137.  
  138.  
  139.               immediately after checkin.
  140.  
  141.               The --ll, --rr, and --uu options are  mutually  exclusive
  142.               and  silently  override  each  other.  For example,
  143.               ccii --uu --rr is equivalent to ccii --rr  because  --rr  over-
  144.               rides --uu.
  145.  
  146.        --ff[_r_e_v]
  147.               forces  a  deposit;  the  new revision is deposited
  148.               even it is not different from the preceding one.
  149.  
  150.        --kk[_r_e_v]
  151.               searches the working file  for  keyword  values  to
  152.               determine   its  revision  number,  creation  date,
  153.               state, and author (see ccoo(1)),  and  assigns  these
  154.               values  to the deposited revision, rather than com-
  155.               puting them locally.  It also generates  a  default
  156.               login  message  noting  the login of the caller and
  157.               the actual checkin date.  This option is useful for
  158.               software  distribution.  A revision that is sent to
  159.               several sites should be  checked  in  with  the  --kk
  160.               option at these sites to preserve the original num-
  161.               ber, date, author, and state.  The  extracted  key-
  162.               word  values  and  the  default  log message may be
  163.               overridden with the options --dd, --mm, --ss, --ww, and any
  164.               option that carries a revision number.
  165.  
  166.        --qq[_r_e_v]
  167.               quiet  mode;  diagnostic  output is not printed.  A
  168.               revision that is not different from  the  preceding
  169.               one is not deposited, unless --ff is given.
  170.  
  171.        --II[_r_e_v]
  172.               interactive  mode;  the  user is prompted and ques-
  173.               tioned even if the standard input is not  a  termi-
  174.               nal.
  175.  
  176.        --dd[_d_a_t_e]
  177.               uses  _d_a_t_e for the checkin date and time.  The _d_a_t_e
  178.               is specified in free format as explained in  ccoo(1).
  179.               This  is  useful  for lying about the checkin date,
  180.               and for --kk if no date is  available.   If  _d_a_t_e  is
  181.               empty, the working file's time of last modification
  182.               is used.
  183.  
  184.        --MM[_r_e_v]
  185.               Set the modification time on any new  working  file
  186.               to  be  the  date  of  the retrieved revision.  For
  187.               example, ccii --dd --MM --uu _f does not alter _f's modifica-
  188.               tion  time, even if _f's contents change due to key-
  189.               word substitution.  Use this option with  care;  it
  190.               can confuse mmaakkee(1).
  191.  
  192.        --mm_m_s_g  uses  the  string  _m_s_g  as  the log message for all
  193.  
  194.  
  195.  
  196. GNU                         1991/10/07                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CI(1)                                                       CI(1)
  203.  
  204.  
  205.               revisions checked in.
  206.  
  207.        --nn_n_a_m_e assigns the symbolic name _n_a_m_e to the number of the
  208.               checked-in revision.  ccii prints an error message if
  209.               _n_a_m_e is already assigned to another number.
  210.  
  211.        --NN_n_a_m_e same as --nn, except that  it  overrides  a  previous
  212.               assignment of _n_a_m_e.
  213.  
  214.        --ss_s_t_a_t_e
  215.               sets  the  state  of the checked-in revision to the
  216.               identifier _s_t_a_t_e.  The default state is EExxpp.
  217.  
  218.        --tt_f_i_l_e writes descriptive text from the  contents  of  the
  219.               named _f_i_l_e into the RCS file, deleting the existing
  220.               text.  The _f_i_l_e may not begin with --.
  221.  
  222.        --tt--_s_t_r_i_n_g
  223.               Write descriptive text from the _s_t_r_i_n_g into the RCS
  224.               file, deleting the existing text.
  225.  
  226.               The  --tt  option, in both its forms, has effect only
  227.               during an initial checkin; it is  silently  ignored
  228.               otherwise.
  229.  
  230.               During  the initial checkin, if --tt is not given, ccii
  231.               obtains the text from standard input, terminated by
  232.               end-of-file  or  by  a line containing .. by itself.
  233.               The user is prompted for the text if interaction is
  234.               possible; see --II.
  235.  
  236.               For  backward  compatibility with older versions of
  237.               RCS, a bare --tt option is ignored.
  238.  
  239.        --ww_l_o_g_i_n
  240.               uses _l_o_g_i_n for the author field  of  the  deposited
  241.               revision.   Useful  for lying about the author, and
  242.               for --kk if no author is available.
  243.  
  244.        --VV_n    Emulate RCS version _n.  See ccoo(1) for details.
  245.  
  246.        --xx_s_u_f_f_i_x_e_s
  247.               specifies the suffixes for RCS files.   A  nonempty
  248.               suffix  matches  any pathname ending in the suffix.
  249.               An empty suffix matches any pathname  of  the  form
  250.               RRCCSS//_f_i_l_e or _p_a_t_h//RRCCSS//_f_i_l_e_.  The --xx option can spec-
  251.               ify a list of suffixes separated by //.   For  exam-
  252.               ple, --xx,,vv// specifies two suffixes: ,,vv and the empty
  253.               suffix.  If two or  more  suffixes  are  specified,
  254.               they  are  tried  in  order when looking for an RCS
  255.               file; the first one that works  is  used  for  that
  256.               file.   If no RCS file is found but an RCS file can
  257.               be created, the suffixes  are  tried  in  order  to
  258.               determine the new RCS file's name.  The default for
  259.  
  260.  
  261.  
  262. GNU                         1991/10/07                          4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CI(1)                                                       CI(1)
  269.  
  270.  
  271.               _s_u_f_f_i_x_e_s is installation-dependent; normally it  is
  272.               ,,vv//  for hosts like Unix that permit commas in file
  273.               names, and is empty (i.e. just  the  empty  suffix)
  274.               for other hosts.
  275.  
  276. FFIILLEE NNAAMMIINNGG
  277.        Pairs  of  RCS files and working files may be specified in
  278.        three ways (see also the example section).
  279.  
  280.        1) Both the RCS file and the working file are given.   The
  281.        RCS  pathname is of the form _p_a_t_h_1//_w_o_r_k_f_i_l_e_X and the work-
  282.        ing pathname is of the form  _p_a_t_h_2//_w_o_r_k_f_i_l_e  where  _p_a_t_h_1//
  283.        and  _p_a_t_h_2// are (possibly different or empty) paths, _w_o_r_k_-
  284.        _f_i_l_e is a filename, and _X is  an  RCS  suffix.   If  _X  is
  285.        empty, _p_a_t_h_1// must be RRCCSS// or must end in //RRCCSS//.
  286.  
  287.        2)  Only  the RCS file is given.  Then the working file is
  288.        created in the current directory and its name  is  derived
  289.        from  the  name of the RCS file by removing _p_a_t_h_1// and the
  290.        suffix _X.
  291.  
  292.        3) Only the working file is given.  Then ccii considers each
  293.        RCS  suffix _X in turn, looking for an RCS file of the form
  294.        _p_a_t_h_2//RRCCSS//_w_o_r_k_f_i_l_e_X or (if the former is not found  and  _X
  295.        is nonempty) _p_a_t_h_2//_w_o_r_k_f_i_l_e_X_.
  296.  
  297.        If  the RCS file is specified without a path in 1) and 2),
  298.        ccii looks for the RCS file first in the directory ..//RRCCSS and
  299.        then in the current directory.
  300.  
  301.        ccii  reports  an  error  if  an attempt to open an RCS file
  302.        fails for an unusual reason, even if the RCS file's  path-
  303.        name  is  just one of several possibilities.  For example,
  304.        to suppress use of RCS commands in a directory _d, create a
  305.        regular  file  named  _d//RRCCSS so that casual attempts to use
  306.        RCS commands in _d fail because _d//RRCCSS is not a directory.
  307.  
  308. EEXXAAMMPPLLEESS
  309.        Suppose ,,vv is an RCS suffix and the current directory con-
  310.        tains  a  subdirectory  RRCCSS with an RCS file iioo..cc,,vv.  Then
  311.        each of the following commands check in  a  copy  of  iioo..cc
  312.        into RRCCSS//iioo..cc,,vv as the latest revision, removing iioo..cc.
  313.  
  314.               ccii  iioo..cc;;    ccii  RRCCSS//iioo..cc,,vv;;   ccii  iioo..cc,,vv;;
  315.               ccii  iioo..cc  RRCCSS//iioo..cc,,vv;;    ccii  iioo..cc  iioo..cc,,vv;;
  316.               ccii  RRCCSS//iioo..cc,,vv  iioo..cc;;    ccii  iioo..cc,,vv  iioo..cc;;
  317.  
  318.        Suppose instead that the empty suffix is an RCS suffix and
  319.        the current directory contains a subdirectory RRCCSS with  an
  320.        RCS  file iioo..cc.  The each of the following commands checks
  321.        in a new revision.
  322.  
  323.               ccii  iioo..cc;;    ccii  RRCCSS//iioo..cc;;
  324.               ccii  iioo..cc  RRCCSS//iioo..cc;;
  325.  
  326.  
  327.  
  328. GNU                         1991/10/07                          5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CI(1)                                                       CI(1)
  335.  
  336.  
  337.               ccii  RRCCSS//iioo..cc  iioo..cc;;
  338.  
  339. FFIILLEE MMOODDEESS
  340.        An RCS file created by ccii inherits the  read  and  execute
  341.        permissions from the working file.  If the RCS file exists
  342.        already, ccii preserves its read  and  execute  permissions.
  343.        ccii always turns off all write permissions of RCS files.
  344.  
  345. FFIILLEESS
  346.        Several  temporary  files  may be created in the directory
  347.        containing the working file, and  also  in  the  temporary
  348.        directory  (see  TTMMPPDDIIRR  under  EENNVVIIRROONNMMEENNTT).  A semaphore
  349.        file or files are created in the directory containing  the
  350.        RCS  file.   With  a  nonempty suffix, the semaphore names
  351.        begin with the first character of the  suffix;  therefore,
  352.        do  not  specify  an suffix whose first character could be
  353.        that of a working filename.  With  an  empty  suffix,  the
  354.        semaphore names end with __ so working filenames should not
  355.        end in __.
  356.  
  357.        ccii never changes an RCS or  working  file.   Normally,  ccii
  358.        unlinks  the  file  and  creates a new one; but instead of
  359.        breaking a chain of one or more symbolic links to  an  RCS
  360.        file, it unlinks the destination file instead.  Therefore,
  361.        ccii breaks any hard or symbolic links to any  working  file
  362.        it  changes;  and hard links to RCS files are ineffective,
  363.        but symbolic links to RCS files are preserved.
  364.  
  365.        The effective user must be able to search  and  write  the
  366.        directory  containing  the  RCS  file.  Normally, the real
  367.        user must be able to read the RCS and working files and to
  368.        search  and  write  the  directory  containing the working
  369.        file; however,  some  older  hosts  cannot  easily  switch
  370.        between  real  and  effective users, so on these hosts the
  371.        effective user is used for all  accesses.   The  effective
  372.        user is the same as the real user unless your copies of ccii
  373.        and ccoo have setuid privileges.  As described in  the  next
  374.        section,  these  privileges  yield  extra  security if the
  375.        effective user owns all RCS files and directories, and  if
  376.        only the effective user can write RCS directories.
  377.  
  378.        Users  can control access to RCS files by setting the per-
  379.        missions of the directory containing the files; only users
  380.        with write access to the directory can use RCS commands to
  381.        change its RCS files.  For example, in hosts that allow  a
  382.        user  to  belong to several groups, one can make a group's
  383.        RCS  directories  writable  to  that  group  only.    This
  384.        approach suffices for informal projects, but it means that
  385.        any group member can arbitrarily change  the  group's  RCS
  386.        files, and can even remove them entirely.  Hence more for-
  387.        mal projects sometimes distinguish between an RCS adminis-
  388.        trator,  who  can  change the RCS files at will, and other
  389.        project members, who can check in new revisions but cannot
  390.        otherwise change the RCS files.
  391.  
  392.  
  393.  
  394. GNU                         1991/10/07                          6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CI(1)                                                       CI(1)
  401.  
  402.  
  403. SSEETTUUIIDD UUSSEE
  404.        To prevent anybody but their RCS administrator from delet-
  405.        ing revisions, a set of users can employ setuid privileges
  406.        as follows.
  407.  
  408.        o Check  that the host supports RCS setuid use.  Consult a
  409.          trustworthy expert if there are any doubts.  It is  best
  410.          if the sseetteeuuiidd(()) system call works as described in Posix
  411.          1003.1a Draft 5, because RCS can switch back  and  forth
  412.          easily  between  real  and  effective users, even if the
  413.          real user is rroooott.  If not, the second best  is  if  the
  414.          sseettuuiidd(())   system   call   supports  saved  setuid  (the
  415.          {_POSIX_SAVED_IDS} behavior of Posix 1003.1-1990);  this
  416.          fails only if the real user is rroooott.  If RCS detects any
  417.          failure in setuid, it quits immediately.
  418.  
  419.        o Choose a user _A to serve as RCS  administrator  for  the
  420.          set  of  users.   Only  _A will be able to invoke the rrccss
  421.          command on the users' RCS files.  _A should not  be  rroooott
  422.          or  any other user with special powers.  Mutually suspi-
  423.          cious sets of users should use different administrators.
  424.  
  425.        o Choose  a  path name _B that will be a directory of files
  426.          to be executed by the users.
  427.  
  428.        o Have _A set up _B to contain copies of ccii and ccoo that  are
  429.          setuid  to _A by copying the commands from their standard
  430.          installation directory _D as follows:
  431.  
  432.               mmkkddiirr  _B
  433.               ccpp  _D//cc[[iioo]]  _B
  434.               cchhmmoodd  ggoo--ww,,uu++ss  _B//cc[[iioo]]
  435.  
  436.        o Have each user prepend _B to their path as follows:
  437.  
  438.               PPAATTHH==_B::$$PPAATTHH;;  eexxppoorrtt  PPAATTHH  # ordinary shell
  439.               sseett  ppaatthh==((_B  $$ppaatthh))  # C shell
  440.  
  441.        o Have _A create each RCS directory  _R  with  write  access
  442.          only to _A as follows:
  443.  
  444.               mmkkddiirr  _R
  445.               cchhmmoodd  ggoo--ww  _R
  446.  
  447.        o If  you  want  to  let  only  certain users read the RCS
  448.          files, put the users into a group _G, and have _A  further
  449.          protect the RCS directory as follows:
  450.  
  451.               cchhggrrpp  _G  _R
  452.               cchhmmoodd  gg--ww,,oo--rrwwxx  _R
  453.  
  454.        o Have  _A  copy  old  RCS files (if any) into _R, to ensure
  455.          that _A owns them.
  456.  
  457.  
  458.  
  459.  
  460. GNU                         1991/10/07                          7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. CI(1)                                                       CI(1)
  467.  
  468.  
  469.        o An RCS file's access list limits who can  check  in  and
  470.          lock revisions.  The default access list is empty, which
  471.          grants checkin access to anyone who  can  read  the  RCS
  472.          file.   If  you want limit checkin access, have _A invoke
  473.          rrccss --aa  on  the  file;  see  rrccss(1).    In   particular,
  474.          rrccss --ee --aa_A limits access to just _A.
  475.  
  476.        o Have  _A  initialize any new RCS files with rrccss --ii before
  477.          initial checkin, adding the --aa option  if  you  want  to
  478.          limit checkin access.
  479.  
  480.        o Give  setuid privileges only to ccii, ccoo, and rrccsscclleeaann; do
  481.          not give them to rrccss or to any other command.
  482.  
  483.        o Do not use other setuid commands to invoke RCS commands;
  484.          setuid is trickier than you think!
  485.  
  486. EENNVVIIRROONNMMEENNTT
  487.        RRCCSSIINNIITT
  488.               options  prepended  to the argument list, separated
  489.               by spaces.  A backslash escapes  spaces  within  an
  490.               option.   The  RRCCSSIINNIITT options are prepended to the
  491.               argument  lists  of  most  RCS  commands.    Useful
  492.               RRCCSSIINNIITT options include --qq, --VV, and --xx.
  493.  
  494.        TTMMPPDDIIRR Name  of  the temporary directory.  If not set, the
  495.               environment variables TTMMPP and  TTEEMMPP  are  inspected
  496.               instead and the first value found is taken; if none
  497.               of them are set, a host-dependent default is  used,
  498.               typically //ttmmpp.
  499.  
  500. DDIIAAGGNNOOSSTTIICCSS
  501.        For  each  revision,  ccii  prints the RCS file, the working
  502.        file, and the number of both the deposited and the preced-
  503.        ing  revision.  The exit status is zero if and only if all
  504.        operations were successful.
  505.  
  506. IIDDEENNTTIIFFIICCAATTIIOONN
  507.        Author: Walter F. Tichy.
  508.        Revision Number: 5.9; Release Date: 1991/10/07.
  509.        Copyright (C) 1982, 1988, 1989 by Walter F. Tichy.
  510.        Copyright (C) 1990, 1991 by Paul Eggert.
  511.  
  512. SSEEEE AALLSSOO
  513.        co(1), ident(1), make(1), rcs(1), rcsclean(1), rcsdiff(1),
  514.        rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
  515.        Walter  F.  Tichy,  RCS--A  System  for  Version  Control,
  516.        _S_o_f_t_w_a_r_e_-_-_P_r_a_c_t_i_c_e  _&  _E_x_p_e_r_i_e_n_c_e  1155,  7   (July   1985),
  517.        637-654.
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526. GNU                         1991/10/07                          8
  527.  
  528.  
  529.